import request from './request'
import qs from 'qs'

//轮播接口
export const BannerApi = () => request.get('/banner')

// 热门歌曲推荐  /personalized?limit=1
export const HotSongApi = (params) => request.post('/personalized/', qs.stringify(params));
//  新碟上架/top/album
export const TopAlbumApi = () => request.get('/top/album');
// 三个榜单 /toplist
export const TopListApi = () => request.get('/toplist');
// 榜单歌曲 /top/
export const PersonalizedApi = (params) => request.post('/top/list', qs.stringify(params));
// 歌手榜 /toplist/artist
export const singerApi = () => request.get('/toplist/artist')
// 热门歌手 /top/artists
export const singSongApi = () => request.get('/top/artists')

// 手机号登录/login/cellphone
export const LoginCellphone = (params) => request.post('/login/cellphone', qs.stringify(params));

// 获取验证码/captcha/sent
export const CaptchaSent = (params) => request.post('/captcha/sent', qs.stringify(params));

// 排行榜右边/playlist/detail
export const playListApi = (id) => request.get(`/playlist/detail?id=${id}`);

// 获取歌曲的url地址  /song/url ?id
export const songApi = (id) => request.get(`/song/url?id=${id}`);